-- GENERATED SPELL FOR [Guardian of Yogg-Saron] --


function spell0_33136(pUnit, Event) --@Dark Volley,Self--
pUnit:FullCastSpellOnTarget(63038,pUnit)
pUnit:RegisterEvent('Sorts_33136', 11500, 1)
end

function spell1_33136(pUnit, Event) --@Dominate Mind,n/a--
pUnit:FullCastSpellOnTarget(63042,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_33136', 10282, 1)
end

function spell2_33136(pUnit, Event) --@Shadow Nova,Self--
pUnit:FullCastSpellOnTarget(62714,pUnit)
pUnit:RegisterEvent('Sorts_33136', 564, 1)
end

function spell3_33136(pUnit, Event) --@Shadow Nova,Self--
pUnit:FullCastSpellOnTarget(65209,pUnit)
pUnit:RegisterEvent('Sorts_33136', 554, 1)
end

function spell4_33136(pUnit, Event) --@Shadow Nova,Self--
pUnit:FullCastSpellOnTarget(65719,pUnit)
pUnit:RegisterEvent('Sorts_33136', 596, 1)
end

function Sorts_33136(pUnit, Event)
local choix_sorts_33136 = math.random(0, 4)
if choix_sorts_33136 == 0 then
pUnit:RegisterEvent('spell0_33136', 1, 1)
end
if choix_sorts_33136 == 1 then
pUnit:RegisterEvent('spell1_33136', 1, 1)
end
if choix_sorts_33136 == 2 then
pUnit:RegisterEvent('spell2_33136', 1, 1)
end
if choix_sorts_33136 == 3 then
pUnit:RegisterEvent('spell3_33136', 1, 1)
end
if choix_sorts_33136 == 4 then
pUnit:RegisterEvent('spell4_33136', 1, 1)
end
end

function mob33136_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_33136', math.random(1500, 3000), 1)
end

function mob33136_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob33136_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob33136_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(33136, 1, 'mob33136_Action')
RegisterUnitEvent(33136, 2, 'mob33136_Leave')
RegisterUnitEvent(33136, 3, 'mob33136_Kill')
RegisterUnitEvent(33136, 4, 'mob33136_Die')
